Epilepsy is an often debilitating neurological condition affecting 3 million Americans and more than 50 million people across the globe. Focal epileptic seizures start in specific brain regions due to abnormal patterns of activity in very specific subpopulations of neurons. However, most anti-epileptic drugs are non-specific in their actions, targeting a large proportion of all neurons and synapses. One of the central goals of the BRAIN Initiative is to control the activity of specific subsets of neurons to causally understand and repair neural circuits. Transgenic mouse lines, combined with optogenetics, have made it possible to simultaneously photoactivate all the neurons of a genetically-identified subtype in a given part of the brain. However, even within a local circuit, individual cells expressing the same genetic marker can have very different temporal dynamics and perform very different behavioral and clinical roles. Thus, as stated in the ?BRAIN 2025: A Scientific Vision? Presentation, new technologies are needed to demonstrate causality by precisely targeting only defined sets of neurons, at cellular resolution, in real time. Recent innovations in digital holography using spatial light modulators (SLM), when combined with two-photon imaging, now make it possible to shape light to precisely target visually-selected neurons for optogenetic interventions. This SLM technology is exactly the solution my lab will now acquire, learn to use, and integrate into our two-photon microscope to causally understand single neuron dynamics and try to prevent epileptic seizures. We will use our substantial software engineering skills to implement closed-loop control of SLM-based optogenetics, so that seizures can be stopped in real-time by only targeting a minimal number of selected neurons. We will then rapidly propagate this critical new technology by freely sharing our new precision-control software with two- photon microscopy & SLM-technology companies and with the wider Brain Science community.